package com.ruoyi.common.core.domain.entity;

import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 地址区域对象 sys_region
 * 
 * @author ruoyi
 * @date 2023-03-28
 */
public class SysRegion extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 表id */
    private Long regionId;

    /** 地区名称 */
    @Excel(name = "地区名称")
    private String regionName;

    /** 地区等级 */
    @Excel(name = "地区等级")
    private Integer level;
    
    /** 父部门ID */
    private Long parentId;
    
    /** 祖籍列表 */
    private String ancestors;
    
    /** 子地区 */
    private List<SysRegion> children = new ArrayList<SysRegion>();

    public void setRegionId(Long regionId) 
    {
        this.regionId = regionId;
    }

    public Long getRegionId() 
    {
        return regionId;
    }
    public void setRegionName(String regionName) 
    {
        this.regionName = regionName;
    }

    public String getRegionName() 
    {
        return regionName;
    }
    public void setLevel(Integer level) 
    {
        this.level = level;
    }

    public Integer getLevel() 
    {
        return level;
    }
    
    
    public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public String getAncestors() {
		return ancestors;
	}

	public void setAncestors(String ancestors) {
		this.ancestors = ancestors;
	}

	public List<SysRegion> getChildren() {
		return children;
	}

	public void setChildren(List<SysRegion> children) {
		this.children = children;
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("regionId", getRegionId())
            .append("regionName", getRegionName())
            .append("level", getLevel())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .toString();
    }
}
